/* this order means we can use x-(just*strlen(text)*t->h_char)/2 if
* term cannot justify
*/
enum JUSTIFY {
LEFT, CENTRE, RIGHT
};
/* we use a similar trick for vertical justification of multi-line labels */
#define JUST_TOP 0
#define JUST_CENTRE 1
#define JUST_BOT 2
#if !(defined(ATARI)&&defined(__GNUC__)&&defined(_MATH_H)) && !(defined(MTOS)&&defined(__GNUC__)&&defined(_MATH_H)) /* FF's math.h has the type already */
struct cmplx {
double real, imag;
};
#endif
struct value {
enum DATA_TYPES type;
union {
int int_val;
struct cmplx cmplx_val;
} v;
};
struct lexical_unit { /* produced by scanner */
TBOOLEAN is_token; /* true if token, false if a value */
struct value l_val;
int start_index; /* index of first char in token */
int length; /* length of token in chars */
};
struct udft_entry { /* user-defined function table entry */
struct udft_entry *next_udf; /* pointer to next udf in linked list */
char udf_name[MAX_ID_LEN+1]; /* name of this function entry */
struct at_type *at; /* pointer to action table to execute */
char *definition; /* definition of function as typed */
struct value dummy_values[MAX_NUM_VAR]; /* current value of dummy variables */
};
struct udvt_entry { /* user-defined value table entry */
struct udvt_entry *next_udv; /* pointer to next value in linked list */
char udv_name[MAX_ID_LEN+1]; /* name of this value entry */
TBOOLEAN udv_undef; /* true if not defined yet */
struct value udv_value; /* value it has */
};
union argument { /* p-code argument */
int j_arg; /* offset for jump */
struct value v_arg; /* constant value */
struct udvt_entry *udv_arg; /* pointer to dummy variable */
struct udft_entry *udf_arg; /* pointer to udf to execute */
};
struct at_entry { /* action table entry */
enum operators index; /* index of p-code function */
union argument arg;
};
struct at_type {
int a_count; /* count of entries in .actions[] */
struct at_entry actions[MAX_AT_LEN];
/* will usually be less than MAX_AT_LEN is malloc()'d copy */
};
/* This type definition has to come after union argument has been declared. */
#ifdef __ZTC__
typedef int (*FUNC_PTR)(...);
#else
typedef int (*FUNC_PTR) __PROTO((union argument *arg));
#endif
struct ft_entry { /* standard/internal function table entry */
char *f_name; /* pointer to name of this function */
FUNC_PTR func; /* address of function to call */
};
/* Defines the type of a coordinate */
/* INRANGE and OUTRANGE points have an x,y point associated with them */
enum coord_type {
INRANGE, /* inside plot boundary */
OUTRANGE, /* outside plot boundary, but defined */